package com.example.yu.slidebottomlayout_demo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

initRecyclerView();
    }
    private void initRecyclerView() {
        //找到recycleview对象
        RecyclerView recyclerView = findViewById(R.id.recycler_view);
        //
        MainActivityListAdapter adapter = new MainActivityListAdapter();
        //绑定适配器
        recyclerView.setAdapter(adapter);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
    }
}
